package com.ruoyi.project.system.statistics.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.project.cms.task.domain.Task;
import com.ruoyi.project.system.statistics.service.ICmsAaService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 作者：YSX
 * 类名：CmsAaController
 * 描述：
 * 时间：2020-05-20
 */
@Controller
@RequestMapping("/system/statistics")
public class CmsAaController extends BaseController {

    private String prefix = "system/statistics";

    @Autowired
    private ICmsAaService cmsAaService;

    @RequiresPermissions("system:statistics:view")
    @GetMapping()
    public String notice()
    {
        return prefix + "/statistics";
    }

    @RequiresPermissions("system:statistics:list")
    @RequestMapping("/list")
    @ResponseBody
    public List<Task> list(Task task) {
        List<Task> list = cmsAaService.selectList(task);
        System.out.println(list);
        return list;
    }


}
